package com.test;

import java.util.concurrent.CountDownLatch;

/**
 * Created by 41579 on 2017/4/21.
 */
public class CountDownAwaitRunnable implements Runnable {
    private CountDownLatch countDown;

    public CountDownAwaitRunnable(CountDownLatch countDown) {
        this.countDown = countDown;
    }

    @Override
    public void run() {
        try {
            countDown.await();
            System.out.println(Thread.currentThread().getName()+"  release.......");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
